package io.renren.modules.location.controller;

import io.renren.common.utils.R;
import io.renren.modules.location.service.LocationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * Created by ThinkPad on 2018/11/15.
 */
@RestController
@RequestMapping("/location")
public class LocationController {
    private Logger logger = LoggerFactory.getLogger(LocationController.class);

    @Autowired
    private LocationService locationService;

    @PostMapping("/getTrailList")
    public R getTrailList(@RequestBody Map<String, Object> paramMap) {
        List<Map> trailList = locationService.getTrailList(paramMap);
        R r = new R();
        r.put("list", trailList);
        return r;
    }

    @PostMapping("/listReportLocation")
    public R listReportLocation(){
        List<Map> maps = locationService.listReportLocation();
        R r = new R();
        r.put("list", maps);
        return r;
    }
}
